package com.hdu.redisHashOperator.entity;

import com.hdu.redisHashOperator.annotation.Identity;
import com.hdu.redisHashOperator.annotation.KeyPrefix;
import com.hdu.redisHashOperator.annotation.StoreFiled;
import lombok.Data;

@Data
@KeyPrefix("user")
public class User {
    @Identity
    private Long id;
    @StoreFiled("name")
    private String name;
    @StoreFiled("sex")
    private String sex;
    // 冗余信息不需要存到redis中
    @StoreFiled(ignore = true)
    private String nickName;
    // 引用复杂类型
    private School school;
}
